package com.sright.bcard.user.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.user.dal.dao.AdminDAO;
import com.sright.bcard.user.dal.entity.AdminDO;
import com.sright.bcard.user.dal.mapper.AdminDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class AdmainDAOImpl extends BaseDAOImpl<AdminDO> implements AdminDAO {

    @Resource
    private AdminDOMapper adminDOMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return adminDOMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<AdminDO> selectByUserName(String username) {
        return adminDOMapper.selectByUserName(username);
    }

    @Override
    public AdminDO selectByEnterpriseId(Long id) {
        return adminDOMapper.selectByEnterpriseId(id);
    }

    @Override
    public AdminDO selectByMobile(String mobile) {
        return adminDOMapper.selectByMobile(mobile);
    }

    @Override
    public Integer updateDayFirstLogin() {
        return adminDOMapper.updateDayFirstLogin();
    }

    @Override
    protected BaseMapper<AdminDO> getObjMapper() {
        return adminDOMapper;
    }
}
